package com.antball.aaa.obsever_mediator;

/**
 * @Auther: huangsj
 * @Date: 2019/8/8 11:43
 * @Description:
 */
public class Client {

    public static void main(String[] args) {

        EventDispatch dispatch = EventDispatch.getEventDispatch();

        dispatch.registeConsumer(new ClickEventConsumer());
        dispatch.registeConsumer(new DoubleClickEventConsumer());

        ControlManager manager = new ControlManager("按钮");
        manager.clickControl();
        manager.doubleClickControl();
        manager.clickControl();
    }
}
